<div class="fly-footer">
    <p>nyist-ACM Online Judge 2.0 |  <a href="{:url('web/Index/faq')}">FAQ</a>
        | <a href="{:url('web/User/onlineuser')}">在线用户</a></p>
    <p>
        Copyright © 2010-2018 | <a href='#'>nyist-ACM Team </a> | <a href="{:url('web/about/team.html')}">关于我们</a> 
        <script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1273689806'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s19.cnzz.com/z_stat.php%3Fid%3D1273689806' type='text/javascript'%3E%3C/script%3E"));</script>
<!--        | 字体：<select class="foot-select" id='webfont'>
            <option value="songti" {if condition="$webfont=='songti'"}selected{/if}>宋体</option>
            <option value="kaiti" {if condition="$webfont=='kaiti'"}selected{/if}>楷体</option>
        </select>-->
    </p>
</div>
<script>
layui.cache.user = {
    uid: -1,
    avatar: '__STATIC__/../upload/users/head/default.png'
};

layui.use(['jquery', 'layer'], function() {
    var layer = layui.layer;
    var $ = layui.jquery;
    $('#login-register,#user-head').on('click', function() {
        layer.open({
            type: 2,
            title: '登入/注册',
            shadeClose: true, //点击遮罩关闭层
            // area: ['40%', '50%'],
            area: ['500px', '300px'],
            content: ['{:url("web/user/userlogin")}','no']
        });
    });

});


layui.config({
    version: "3.0.0",
    base: '__STATIC__/mods/'
}).extend({
    fly: 'index'
}).use(['fly', 'face'], function() {
    var $ = layui.$;
    var fly = layui.fly;
    //如果你是采用模版自带的编辑器，你需要开启以下语句来解析。
    /*
    $('.detail-body').each(function(){
      var othis = $(this), html = othis.html();
      othis.html(fly.content(html));
    });
    */
});
layui.use(['jquery','layer'],function(){
    var $=layui.jquery;
    var layer=layui.layer;
    $('#webfont').change(function(){
        var val=$("#webfont").val();
        //alert(val);
        $.get('/api/setfont',{webfont:val},function(){
            //alert("success");
            layer.msg('设置成功，若无效请按 &#60;Ctrl+F5&#62; 进行体验～');
            setTimeout('location.reload();',1000);
        });
                

    });
});
function i_am_online(f){
    layui.use(['jquery','layer'],function(){
       var $=layui.jquery;
       var layer=layui.layer;
       $.get('{:url("web/User/i_am_online")}',function(res){
           if(res.code===0)
           {
               
           }
           else 
           {
               if(f!='1')layer.msg(res.msg);
           }
       });
    });
}
i_am_online('1');
setInterval('i_am_online()',1000*60*20);
</script>
<script src="__STATIC__/clipboard/clipboard.min.js"></script>